package com.szy.douyou_classification.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author sunziyan
 * @date 2022/1/6
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("classifications")
public class Classification {
    /**
     * 分类id
     * 配置主键的自增策略
     */
    @TableId(type = IdType.AUTO)
    private Long classificationId;
    /**
     * 分类名称
     */
    @TableField(value = "classification_name")
    private String classificationName;
    /**
     * 分类描述
     */
    @TableField(value = "classification_description")
    private String classificationDescription;
    /**
     * 分类图片
     */
    @TableField(value = "classification_image")
    private String classificationImage;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 逻辑删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Integer deleted;


}
